﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Mobile.Master"
    Inherits="System.Web.Mvc.ViewPage<Micrhard.FMCG.Server.Models.DailyModel>" %>

<%@ Import Namespace="Microhard.Permission.Extension" %>
<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<%@ Import Namespace="Micrhard.FMCG.Server.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div data-role="navbar">
        <ul>
            <li><a href="#" class="ui-btn-active ui-state-persist">工作日报</a></li>
        </ul>
    </div>
    <%=Html.ValidationSummary(true)%>
    <%=Html.ValidationMessage("SaveFailure")%>
    <%using (Html.BeginForm("SaveCreate", "DailyPlan", FormMethod.Post, new { id = "groupform" }))
      {
    %>
    <%=Html.Hidden("WeixinToken", ViewData["WeixinToken"])%>
    <%=Html.Hidden("WeixinName", ViewData["WeixinName"])%>
    <%=Html.Hidden("CurrentLoginUserName", Html.GetCurrentUserInfoFromSession().UserName)%>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label>
            时间</label>
        <%=DateTime.Now.Date.ToString("yyyy-MM-dd") %>
        <%=Html.ValidationMessageFor(m => m.CreateTime)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            今日计划(必填)</label>
        <%=Html.TextAreaFor(m => m.TodayPlan, new { placeholder = "今日计划(必填)", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.TodayPlan)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            达成情况(必填)</label>
        <%=Html.TextAreaFor(m => m.TodayFinished, new { placeholder = "达成情况(必填)", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.TodayFinished)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            问题(必填)</label>
        <%=Html.TextAreaFor(m => m.Question, new { placeholder = "问题(必填)", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.Question)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            需要帮助或建议</label>
        <%=Html.TextAreaFor(m => m.Help, new { placeholder = "需要帮助或建议", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.Help)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            其他</label>
        <%=Html.TextAreaFor(m => m.Comment, new { placeholder = "其他", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.Comment)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            明日计划</label>
        <%=Html.TextAreaFor(m => m.TommrowPlan, new { placeholder = "明日计划", rows = "10" })%>
        <%=Html.ValidationMessageFor(m => m.TommrowPlan)%>
    </div>
    <div data-role="fieldcontain" class="ui-hide-label">
        <label for="Advice">
            明日计划巡店</label>
        <%var attr = new Microhard.WebUI.Models.AttriubteOfSelectList
                          {
                              CtrID = "subkaCksSelect",
                              ParameterModelName = "TommrowPlanProtalSubKA",
                              ParameterPropertyIDName = "SubKAID",
                              ParameterPropertyTxtName = "Name",
                              IsMulitiplySelect = true
                          };
          if (Model.TommrowPlanProtalSubKA != null)
          {
              attr.Selected = (Model.TommrowPlanProtalSubKA.Select(r => new Microhard.WebUI.Models.SelectData
              {
                  ID = r.SubKAID.ToString(),
                  Name = r.Name
              })).ToList();
          }
        %>
        <%Html.RenderAction("GetUserMngSubKA", "DailyPlan", attr);%>
    </div>
    <input type="submit" value="提交" data-theme="b" id="btnSubmit" name="btnSubmit" />
    <%} %>
</asp:Content>
